#include<bits/stdc++.h>

using namespace std;

bool prime(int n) {
    if (n == 2)return true;
    if (n < 2 || n % 2 == 0)return false;
    for (int a = 3; a <= n / a; a += 2)
        if (n % a == 0)return false;
    return true;
}

int main() {
    int n;
    cin >> n;
    int a = 2;
    while (n % a) { a++; }
    cout << (a < n && prime(n / a) ? "Yes" : "No") << endl;
    return 0;
}